<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@  page import="domain.PhoneNumber" %>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="nested" uri="http://struts.apache.org/tags-nested"%>
<jsp:include page="topHtml.jsp" />	
	
	<% String contactId = (String)request.getAttribute("contactId"); %>
	<% PhoneNumber phone = (PhoneNumber)request.getAttribute("phone"); %>
	<html:form action="/ModifyPhone">
	<div id="errors" >
		<html:errors />
		</div>
		<input type="hidden" name="contactId" value="<%=contactId %>" />
		<input type="hidden" name="phoneId" value="<%= phone.getPhoneId()  %>" />
		<p>
			<label for="phoneKind">Phone Kind : </label> <select name="phoneKind">
			<% String phoneKind  = phone.getPhoneKind(); %>
				<option value="Home" <%= phoneKind.equals("Home")? "selected" : "" %>>Home</option>
				<option value="Mobile" <%= phoneKind.equals("Mobile")? "selected" : "" %>>Mobile</option>
				<option value="Office" <%= phoneKind.equals("Office")? "selected" : "" %>>Office</option>
				<option value="Other" <%= phoneKind.equals("Other")? "selected" : "" %>>Other</option>
			</select><br />
			<label for="phoneNumber">Phone Number: </label>
			<input type="text" name="phoneNumber" size="12" value="<%= phone.getPhoneNumber()%>"/><br />
			<html:submit styleClass="button"><bean:message key="phone.modify.link" /></html:submit>
		</p>
	</html:form>
<jsp:include page="bottomHtml.jsp" />	